From: Keir Fraser Date: Wed, 20 Jan 2010 09:51:38 +0000 (+0000) Subject: xend: Fix 20825:49a2c1069e14 X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~12716 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=9e5e0eb8408c37b42411c6686c36eccd2426e7fd;p=xen.git xend: Fix 20825:49a2c1069e14 Converting an Python Int, sizeof(long) already returns byte length rather than bit length so do not divide-by-8. Signed-off-by: Keir Fraser --- diff --git a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/xc/xc.c index 996e1b4ae2..1932758090 100644 --- a/tools/python/xen/lowlevel/xc/xc.c +++ b/tools/python/xen/lowlevel/xc/xc.c @@ -933,7 +933,7 @@ static PyObject *pyxc_hvm_build(XcObject *self, if ( PyInt_Check(vcpu_avail_handle) ) { unsigned long v = PyInt_AsLong(vcpu_avail_handle); - for ( i = 0; i < sizeof(long)/8; i++ ) + for ( i = 0; i < sizeof(long); i++ ) vcpu_avail[i] = (uint8_t)(v>>(i*8)); } else if ( PyLong_Check(vcpu_avail_handle) )